# Maintainer: Jelle van der Waa <jelle@archlinux.org>

pkgname=arch-signoff
pkgver=0.5.2
pkgrel=1
pkgdesc='Sign off Arch Linux testing packages'
arch=(any)
url="https://github.com/archlinux/arch-signoff"
license=("custom:ISC")
depends=('python' 'pyalpm' 'python-click' 'python-dateutil'
         'python-requests')
makedepends=('python-setuptools-scm' 'asciidoc' 'git')
checkdepends=('python-pytest-pacman' 'python-pytest' 'python-pytest-cov')
groups=('archlinux-tools')
source=("$pkgname::git+https://github.com/archlinux/arch-signoff.git?signed#tag=$pkgver")
validpgpkeys=(
    'E499C79F53C96A54E572FEE1C06086337C50773E' # Jelle van der Waa
)
md5sums=('SKIP')

build() {
  cd "$pkgname"
  python setup.py build
  make -C man
}

check() {
  cd "$pkgname"
  make test
}

package() {
  cd "$pkgname"
  python setup.py install --root="$pkgdir/" --optimize=1 --skip-build

  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 "man/signoff.1" "$pkgdir/usr/share/man/man1/signoff.1"
}
